<template>
  <div class="addEdit-block" style="width: 100%;">
    <el-form
        :style='{"padding":"30px 40px","boxShadow":"0 0px 0px #999","borderRadius":"6px","flexWrap":"wrap","background":"none","display":"flex","justifyContent":"space-between"}'
        class="add-update-preview"
        ref="ruleForm"
        :model="ruleForm"
        :rules="rules"
        label-width="150px"
    >
      <template>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="姓名" prop="xingming">
          <el-select v-model="ruleForm.xingming" placeholder="请选择姓名">
            <el-option
                v-for="item in xingmings"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="姓名" prop="xingming">
          <el-select v-model="ruleForm.xingming" placeholder="请选择姓名">
            <el-option
                v-for="item in xingmings"
                :key="item.value"
                :label="item.label"
                :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="性别" prop="xingbie">
          <el-input v-model="ruleForm.xingbie" placeholder="性别" clearable :readonly="ro.xingbie"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="性别" prop="xingbie">
          <el-input v-model="ruleForm.xingbie" placeholder="性别" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="身高" prop="shengao">
          <el-input v-model="ruleForm.shengao" placeholder="身高" clearable :readonly="ro.shengao"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="身高" prop="shengao">
          <el-input v-model="ruleForm.shengao" placeholder="身高" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="体重" prop="tizhong">
          <el-input v-model="ruleForm.tizhong" placeholder="体重" clearable :readonly="ro.tizhong"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="体重" prop="tizhong">
          <el-input v-model="ruleForm.tizhong" placeholder="体重" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="血型" prop="xuexing">
          <el-input v-model="ruleForm.xuexing" placeholder="血型" clearable :readonly="ro.xuexing"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="血型" prop="xuexing">
          <el-input v-model="ruleForm.xuexing" placeholder="血型" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="过敏" prop="guomin">
          <el-input v-model="ruleForm.guomin" placeholder="过敏" clearable :readonly="ro.guomin"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="过敏" prop="guomin">
          <el-input v-model="ruleForm.guomin" placeholder="过敏" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="心率" prop="xinlv">
          <el-input v-model="ruleForm.xinlv" placeholder="心率" clearable :readonly="ro.xinlv"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="心率" prop="xinlv">
          <el-input v-model="ruleForm.xinlv" placeholder="心率" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="血压" prop="xueya">
          <el-input v-model="ruleForm.xueya" placeholder="血压" clearable :readonly="ro.xueya"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="血压" prop="xueya">
          <el-input v-model="ruleForm.xueya" placeholder="血压" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-if="type!='info'" label="血糖" prop="xuetang">
          <el-input v-model="ruleForm.xuetang" placeholder="血糖" clearable :readonly="ro.xuetang"></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            v-else class="input" label="血糖" prop="xuetang">
          <el-input v-model="ruleForm.xuetang" placeholder="血糖" readonly></el-input>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="date" v-if="type!='info'" label="登记时间" prop="dengjishijian">
          <el-date-picker
              format="yyyy 年 MM 月 dd 日"
              value-format="yyyy-MM-dd"
              v-model="ruleForm.dengjishijian"
              type="date"
              :readonly="ro.dengjishijian"
              placeholder="登记时间"
          ></el-date-picker>
        </el-form-item>
        <el-form-item
            :style='{"padding":"0px","boxShadow":"0px 0px 0px 0px #d2b3aa","margin":"0 0 20px 0","borderColor":"#d3a7be","borderRadius":"0px","background":"#fff","borderWidth":"0px","display":"block","width":"100%","minWidth":"500px","borderStyle":"solid"}'
            class="input" v-else-if="ruleForm.dengjishijian" label="登记时间" prop="dengjishijian">
          <el-input v-model="ruleForm.dengjishijian" placeholder="登记时间" readonly></el-input>
        </el-form-item>
      </template>
      <el-form-item :style='{"width":"100%","padding":"0","margin":"0 auto","background":"none"}' class="btn">
        <el-button
            :style='{"border":"1px solid #6ebe9b","cursor":"pointer","padding":"0 16px","boxShadow":"inset 0px 0px 56px 0px #5dae8b","margin":"20px 40px 20px 0","color":"#fff","minWidth":"120px","outline":"none","borderRadius":"4px","background":"#fff","width":"auto","lineHeight":"44px","fontSize":"14px","height":"44px"}'
            v-if="type!='info'" type="primary" class="btn-success" @click="onSubmit">提交
        </el-button>
        <el-button
            :style='{"border":"1px solid #e68888","cursor":"pointer","padding":"0 16px","boxShadow":"inset 0px 0px 56px 0px #ff7676","margin":"0","color":"#fff","minWidth":"120px","outline":"none","borderRadius":"4px","background":"#fff","width":"auto","lineHeight":"44px","fontSize":"14px","height":"44px"}'
            v-if="type!='info'" class="btn-close" @click="back()">取消
        </el-button>
        <el-button
            :style='{"border":"1px solid #e68888","cursor":"pointer","padding":"0 16px","boxShadow":"inset 0px 0px 56px 0px #ff7676","margin":"0","color":"#fff","minWidth":"120px","outline":"none","borderRadius":"4px","background":"#fff","width":"auto","lineHeight":"44px","fontSize":"14px","height":"44px"}'
            v-if="type=='info'" class="btn-close" @click="back()">返回
        </el-button>
      </el-form-item>
    </el-form>


  </div>
</template>
<script>
// 数字，邮件，手机，url，身份证校验
import {isNumber, isIntNumer, isEmail, isPhone, isMobile, isURL, checkIdCard} from "@/utils/validate";

export default {
  data() {
    let self = this
    var validateIdCard = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!checkIdCard(value)) {
        callback(new Error("请输入正确的身份证号码"));
      } else {
        callback();
      }
    };
    var validateUrl = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isURL(value)) {
        callback(new Error("请输入正确的URL地址"));
      } else {
        callback();
      }
    };
    var validateMobile = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isMobile(value)) {
        callback(new Error("请输入正确的手机号码"));
      } else {
        callback();
      }
    };
    var validatePhone = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isPhone(value)) {
        callback(new Error("请输入正确的电话号码"));
      } else {
        callback();
      }
    };
    var validateEmail = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isEmail(value)) {
        callback(new Error("请输入正确的邮箱地址"));
      } else {
        callback();
      }
    };
    var validateNumber = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isNumber(value)) {
        callback(new Error("请输入数字"));
      } else {
        callback();
      }
    };
    var validateIntNumber = (rule, value, callback) => {
      if (!value) {
        callback();
      } else if (!isIntNumer(value)) {
        callback(new Error("请输入整数"));
      } else {
        callback();
      }
    };
    return {
      id: '',
      type: '',


      ro: {
        yonghuming: false,
        xingming: false,
        xingbie: false,
        shengao: false,
        tizhong: false,
        xuexing: false,
        guomin: false,
        xinlv: false,
        xueya: false,
        xuetang: false,
        dengjishijian: false,
      },


      ruleForm: {
        yonghuming: '',
        xingming: '',
        xingbie: '',
        shengao: '',
        tizhong: '',
        xuexing: '',
        guomin: '',
        xinlv: '60～100次/分',
        xueya: '90～139mmHg',
        xuetang: '3.9-6.1mmol/L',
        dengjishijian: '',
      },


      rules: {
        yonghuming: [],
        xingming: [],
        xingbie: [],
        shengao: [],
        tizhong: [],
        xuexing: [],
        guomin: [],
        xinlv: [],
        xueya: [],
        xuetang: [],
        dengjishijian: [],
      },

      yonghumings: [],
      xingmings: []
    };
  },
  props: ["parent"],
  computed: {},
  created() {
    this.ruleForm.dengjishijian = this.getCurDate()
  },
  methods: {

    // 下载
    download(file) {
      window.open(`${file}`)
    },
    // 初始化
    init(id, type) {
      if (id) {
        this.id = id;
        this.type = type;
      }
      if (this.type == 'info' || this.type == 'else') {
        this.info(id);
      } else if (this.type == 'logistics') {
        this.logistics = false;
        this.info(id);
      } else if (this.type == 'cross') {
        var obj = this.$storage.getObj('crossObj');
        for (var o in obj) {
          if (o == 'yonghuming') {
            this.ruleForm.yonghuming = obj[o];
            this.ro.yonghuming = true;
            continue;
          }
          if (o == 'xingming') {
            this.ruleForm.xingming = obj[o];
            this.ro.xingming = true;
            continue;
          }
          if (o == 'xingbie') {
            this.ruleForm.xingbie = obj[o];
            this.ro.xingbie = true;
            continue;
          }
          if (o == 'shengao') {
            this.ruleForm.shengao = obj[o];
            this.ro.shengao = true;
            continue;
          }
          if (o == 'tizhong') {
            this.ruleForm.tizhong = obj[o];
            this.ro.tizhong = true;
            continue;
          }
          if (o == 'xuexing') {
            this.ruleForm.xuexing = obj[o];
            this.ro.xuexing = true;
            continue;
          }
          if (o == 'guomin') {
            this.ruleForm.guomin = obj[o];
            this.ro.guomin = true;
            continue;
          }
          if (o == 'xinlv') {
            this.ruleForm.xinlv = obj[o];
            this.ro.xinlv = true;
            continue;
          }
          if (o == 'xueya') {
            this.ruleForm.xueya = obj[o];
            this.ro.xueya = true;
            continue;
          }
          if (o == 'xuetang') {
            this.ruleForm.xuetang = obj[o];
            this.ro.xuetang = true;
            continue;
          }
          if (o == 'dengjishijian') {
            this.ruleForm.dengjishijian = obj[o];
            this.ro.dengjishijian = true;
            continue;
          }
        }


        this.ruleForm.xinlv = '60～100次/分'

        this.ruleForm.xueya = '90～139mmHg'

        this.ruleForm.xuetang = '3.9-6.1mmol/L'

      }

      // 获取用户信息
      this.$http({
        url: `yonghu/page`,
        method: "get"
      }).then(({data}) => {
        this.yonghumings = data.data.list.map(item => {
          return {
            value: item.yonghuming,
            label: item.yonghuming
          }
        })

        this.xingmings = data.data.list.map(item => {
          return {
            value: item.xingming,
            label: item.xingming
          }
        })
      });

      // 获取用户信息
      this.$http({
        url: `${this.$storage.get('sessionTable')}/session`,
        method: "get"
      }).then(({data}) => {
        if (data && data.code === 0) {

          var json = data.data;
          if (((json.yonghuming != '' && json.yonghuming) || json.yonghuming == 0) && this.$storage.get("role") != "管理员") {
            // this.ruleForm.yonghuming = json.yonghuming
            // this.ro.yonghuming = true;
          }
          if (((json.xingming != '' && json.xingming) || json.xingming == 0) && this.$storage.get("role") != "管理员") {
            // this.ruleForm.xingming = json.xingming
            // this.ro.xingming = true;
          }
          if (((json.xingbie != '' && json.xingbie) || json.xingbie == 0) && this.$storage.get("role") != "管理员") {
            // this.ruleForm.xingbie = json.xingbie
            // this.ro.xingbie = true;
          }
        } else {
          this.$message.error(data.msg);
        }
      });


    },
    // 多级联动参数

    info(id) {
      this.$http({
        url: `jiankangjilu/info/${id}`,
        method: "get"
      }).then(({data}) => {
        if (data && data.code === 0) {
          this.ruleForm = data.data;
          //解决前台上传图片后台不显示的问题
          let reg = new RegExp('../../../upload', 'g')//g代表全部
        } else {
          this.$message.error(data.msg);
        }
      });
    },


    // 提交
    onSubmit() {


      var objcross = this.$storage.getObj('crossObj');

      //更新跨表属性
      var crossuserid;
      var crossrefid;
      var crossoptnum;
      if (this.type == 'cross') {
        var statusColumnName = this.$storage.get('statusColumnName');
        var statusColumnValue = this.$storage.get('statusColumnValue');
        if (statusColumnName != '') {
          var obj = this.$storage.getObj('crossObj');
          if (statusColumnName && !statusColumnName.startsWith("[")) {
            for (var o in obj) {
              if (o == statusColumnName) {
                obj[o] = statusColumnValue;
              }
            }
            var table = this.$storage.get('crossTable');
            this.$http({
              url: `${table}/update`,
              method: "post",
              data: obj
            }).then(({data}) => {
            });
          } else {
            crossuserid = this.$storage.get('userid');
            crossrefid = obj['id'];
            crossoptnum = this.$storage.get('statusColumnName');
            crossoptnum = crossoptnum.replace(/\[/, "").replace(/\]/, "");
          }
        }
      }
      this.$refs["ruleForm"].validate(valid => {
        if (valid) {
          if (crossrefid && crossuserid) {
            this.ruleForm.crossuserid = crossuserid;
            this.ruleForm.crossrefid = crossrefid;
            let params = {
              page: 1,
              limit: 10,
              crossuserid: this.ruleForm.crossuserid,
              crossrefid: this.ruleForm.crossrefid,
            }
            this.$http({
              url: "jiankangjilu/page",
              method: "get",
              params: params
            }).then(({
                       data
                     }) => {
              if (data && data.code === 0) {
                if (data.data.total >= crossoptnum) {
                  this.$message.error(this.$storage.get('tips'));
                  return false;
                } else {
                  this.$http({
                    url: `jiankangjilu/${!this.ruleForm.id ? "save" : "update"}`,
                    method: "post",
                    data: this.ruleForm
                  }).then(({data}) => {
                    if (data && data.code === 0) {
                      this.$message({
                        message: "操作成功",
                        type: "success",
                        duration: 1500,
                        onClose: () => {
                          this.parent.showFlag = true;
                          this.parent.addOrUpdateFlag = false;
                          this.parent.jiankangjiluCrossAddOrUpdateFlag = false;
                          this.parent.search();
                          this.parent.contentStyleChange();
                        }
                      });
                    } else {
                      this.$message.error(data.msg);
                    }
                  });

                }
              } else {
              }
            });
          } else {
            this.$http({
              url: `jiankangjilu/${!this.ruleForm.id ? "save" : "update"}`,
              method: "post",
              data: this.ruleForm
            }).then(({data}) => {
              if (data && data.code === 0) {
                this.$message({
                  message: "操作成功",
                  type: "success",
                  duration: 1500,
                  onClose: () => {
                    this.parent.showFlag = true;
                    this.parent.addOrUpdateFlag = false;
                    this.parent.jiankangjiluCrossAddOrUpdateFlag = false;
                    this.parent.search();
                    this.parent.contentStyleChange();
                  }
                });
              } else {
                this.$message.error(data.msg);
              }
            });
          }
        }
      });
    },
    // 获取uuid
    getUUID() {
      return new Date().getTime();
    },
    // 返回
    back() {
      this.parent.showFlag = true;
      this.parent.addOrUpdateFlag = false;
      this.parent.jiankangjiluCrossAddOrUpdateFlag = false;
      this.parent.contentStyleChange();
    },
  }
};
</script>
<style lang="scss" scoped>
.amap-wrapper {
  width: 100%;
  height: 500px;
}

.search-box {
  position: absolute;
}

.el-date-editor.el-input {
  width: auto;
}

.add-update-preview .el-form-item /deep/ .el-form-item__label {
  padding: 0 10px 0 0;
  text-shadow: 0 1px 10px #fff;
  color: #666;
  background: none;
  display: inline-block;
  width: 150px;
  font-size: 14px;
  line-height: 40px;
  text-align: right;
}

.add-update-preview .el-form-item /deep/ .el-form-item__content {
  margin-left: 150px;
}

.add-update-preview .el-input /deep/ .el-input__inner {
  border: 1px solid #c7ebdb;
  border-radius: 4px;
  padding: 0 12px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  outline: none;
  color: #666;
  background: #fff;
  display: inline-block;
  width: auto;
  font-size: 14px;
  min-width: 300px;
  height: 40px;
}

.add-update-preview .el-select /deep/ .el-input__inner {
  border: 1px solid #c7ebdb;
  border-radius: 4px;
  padding: 0 10px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  outline: none;
  color: #666;
  background: #fff;
  width: auto;
  font-size: 14px;
  min-width: 300px;
  height: 40px;
}

.add-update-preview .el-date-editor /deep/ .el-input__inner {
  border: 1px solid #c7ebdb;
  border-radius: 4px;
  padding: 0 10px 0 30px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  outline: none;
  color: #666;
  background: #fff;
  width: auto;
  font-size: 14px;
  min-width: 300px;
  height: 40px;
}

.add-update-preview /deep/ .el-upload--picture-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  line-height: initial;
  vertical-align: middle;
}

.add-update-preview /deep/ .upload .upload-img {
  border: 1px solid #c7ebdb;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  color: #aaa;
  background: #fff;
  width: 200px;
  font-size: 32px;
  line-height: 100px;
  text-align: center;
  height: 100px;
}

.add-update-preview /deep/ .el-upload-list .el-upload-list__item {
  border: 1px solid #c7ebdb;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  color: #aaa;
  background: #fff;
  width: 200px;
  font-size: 32px;
  line-height: 100px;
  text-align: center;
  height: 100px;
}

.add-update-preview /deep/ .el-upload .el-icon-plus {
  border: 1px solid #c7ebdb;
  cursor: pointer;
  border-radius: 4px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  color: #aaa;
  background: #fff;
  width: 200px;
  font-size: 32px;
  line-height: 100px;
  text-align: center;
  height: 100px;
}

.add-update-preview .el-textarea /deep/ .el-textarea__inner {
  border: 1px solid #c7ebdb;
  border-radius: 4px;
  padding: 12px;
  box-shadow: inset 0px 0px 24px 0px #e8f9f2;
  outline: none;
  color: #666;
  background: #fff;
  width: auto;
  font-size: 14px;
  min-height: 150px;
  min-width: 640px;
  height: auto;
}
</style>
